import java.io.IOException;
import java.io.InputStream;
import javax.microedition.media.*;
import javax.microedition.midlet.*;

public class PlayMidFileAudio extends MIDlet {
	public Player player;

	public PlayMidFileAudio() {
		try {
			InputStream in = getClass().getResourceAsStream("CoBeBanDiem.mid");
			player = Manager.createPlayer(in, "audio/midi");
			player.setLoopCount(5);
			player.start();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (MediaException e) {
			e.printStackTrace();
		}
	}

	protected void destroyApp(boolean arg0) {
	}

	protected void pauseApp() {

	}

	protected void startApp() throws MIDletStateChangeException {
		
	}

}
